{% extends 'base_result.html' %}
{% block content %}
    <div class="header">
        <div class="header-content">
            <h1>存在精确解的高指标DAE</h1>
            <p class="header-subtitle">非线性微分方程</p>
        </div>
    </div>

    <div class="results-container">
        <a href="{% url 'myweb:index' %}" class="back-link">
            <i class="fas fa-arrow-left"></i> 返回主页面
        </a>

        <div class="content-wrapper">
            <!-- 模型公式部分 -->
            <div class="model-section">
                <div class="section-card">
                    <h2 class="section-title">
                        <i class="fas fa-square-root-alt"></i> 数学模型描述
                    </h2>
                    <div class="equation-container">
                        <div class="equation-group">
                            <h3>微分代数方程</h3>
                            <div class="equation">\(\frac{d^2 x}{dt^2} = -\lambda x\)</div>
                            <div class="equation">\(\frac{d^2 y}{dt^2} = -\lambda y\)</div>
                            <div class="equation">\(\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1\)</div>
                        </div>
                        <div class="equation-group">
                            <h3>初始条件</h3>
                            <div class="equation">\(x(0) = 1.0\)</div>
                            <div class="equation">\(y(0) = 0.0\)</div>
                            <div class="equation">\(\frac{dx}{dt}(0) = 0.0\)</div>
                            <div class="equation">\(\frac{dy}{dt}(0) = 1.0\)</div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 可视化结果部分 -->
            <div class="visualization-section">
                <div class="section-card">
                    <h2 class="section-title">
                        <i class="fas fa-chart-line"></i> 数值模拟结果
                    </h2>
                    <div class="image-container">
                        <img src="/static/img/demo2.png" alt="高指标DAE数值模拟结果" class="result-image">
                        <div class="image-caption">图1. PINN方法求解高指标DAE的数值模拟结果</div>
                    </div>
                </div>
            </div>

            <!-- 数据表格部分 -->
            <div class="data-section">
                <div class="section-card">
                    <h2 class="section-title">
                        <i class="fas fa-table"></i> 数值结果对比
                    </h2>
                    <div class="table-container">
                        <div class="table-responsive">
                            <table class="data-table">
                                <thead>
                                <tr>
                                    <th>时间 t</th>
                                    <th colspan="3">变量 u</th>
                                    <th colspan="3">变量 v</th>
                                </tr>
                                <tr>
                                    <th></th>
                                    <th>精确解</th>
                                    <th>预测解</th>
                                    <th>绝对误差</th>
                                    <th>精确解</th>
                                    <th>预测解</th>
                                    <th>绝对误差</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>0.00</td>
                                    <td>1.00</td>
                                    <td>1.00</td>
                                    <td class="error-cell">1.02E-03</td>
                                    <td>0.00</td>
                                    <td>-0.00</td>
                                    <td class="error-cell">2.48E-03</td>
                                </tr>
                                <tr>
                                    <td>0.67</td>
                                    <td>0.78</td>
                                    <td>0.79</td>
                                    <td>2.90E-03</td>
                                    <td>0.62</td>
                                    <td>0.62</td>
                                    <td>4.00E-03</td>
                                </tr>
                                <tr>
                                    <td>1.33</td>
                                    <td>0.24</td>
                                    <td>0.24</td>
                                    <td>4.72E-03</td>
                                    <td>0.97</td>
                                    <td>0.97</td>
                                    <td>3.10E-03</td>
                                </tr>
                                <tr>
                                    <td>2.00</td>
                                    <td>-0.42</td>
                                    <td>-0.41</td>
                                    <td>3.79E-03</td>
                                    <td>0.91</td>
                                    <td>0.91</td>
                                    <td>1.66E-03</td>
                                </tr>
                                <tr>
                                    <td>2.67</td>
                                    <td>-0.89</td>
                                    <td>-0.89</td>
                                    <td>2.11E-03</td>
                                    <td>0.45</td>
                                    <td>0.45</td>
                                    <td>2.40E-03</td>
                                </tr>
                                <tr>
                                    <td>3.33</td>
                                    <td>-0.98</td>
                                    <td>-0.98</td>
                                    <td>2.42E-03</td>
                                    <td>-0.19</td>
                                    <td>-0.19</td>
                                    <td>3.97E-03</td>
                                </tr>
                                <tr>
                                    <td>4.00</td>
                                    <td>-0.65</td>
                                    <td>-0.65</td>
                                    <td>3.98E-03</td>
                                    <td>-0.76</td>
                                    <td>-0.76</td>
                                    <td>2.87E-03</td>
                                </tr>
                                <tr>
                                    <td>4.67</td>
                                    <td>-0.04</td>
                                    <td>-0.04</td>
                                    <td>3.58E-03</td>
                                    <td>-1.00</td>
                                    <td>-1.00</td>
                                    <td>1.95E-04</td>
                                </tr>
                                <tr>
                                    <td>5.33</td>
                                    <td>0.58</td>
                                    <td>0.58</td>
                                    <td>1.11E-03</td>
                                    <td>-0.82</td>
                                    <td>-0.82</td>
                                    <td>4.36E-03</td>
                                </tr>
                                <tr>
                                    <td>6.00</td>
                                    <td>0.96</td>
                                    <td>0.95</td>
                                    <td>1.48E-02</td>
                                    <td>-0.28</td>
                                    <td>-0.52</td>
                                    <td>2.42E-01</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}